package cn.biplam.front.component.view.systemManage.sysprivi.user.manage.navi;

import cn.biplam.common.paramters.TreeParam;
import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.common.wrapper.KvMap;
import cn.biplam.common.wrapper.UserInfo;
import cn.biplam.front.component.data.tree.nodeList.IndexTreeChildList;
import cn.biplam.front.component.view.systemManage.sysprivi.user.UserManage;
import cn.biplam.front.html.base.HtmlWindow;
import cn.biplam.front.template.control.rfFlowTable.callback.action.ActionCallbackBase;
import cn.biplam.front.template.pageFrame.mdManage.MdObject;

/**
 *  用户及用户主题列表,由用户主题导航链接
 * @author XiaoRuxing Nov 2, 20096:06:15 PM
 * @version 1.0
 */
public class UserThemeList {

	private UserInfo mUser;
	@SuppressWarnings("unused")
	private String sHomeUrl;
	private String nodeId;
	private KvMap<String, String> params;
	
	public UserThemeList(UserInfo mUser,String sHomeUrl,String recordId,KvMap<String, String> params){
		this.mUser = mUser;
		this.sHomeUrl = sHomeUrl;
		this.nodeId = params.getByKey(TreeParam.NODE_ID);
		this.params = params;
	}
	
	/**
	 *  获取用户管理主界面
	 * @param mUser    用户信息
	 * @param sHomeUrl 应用系统路径
	 * @return HtmlWindow 用户管理主界面页面
	 * @throws ErrorMessage 
	 */
	public HtmlWindow get() throws ErrorMessage{
		MdObject mdo = new MdObject(UserManage.User_List+"t",nodeId,false);
		
		IndexTreeChildList list = new IndexTreeChildList(sHomeUrl,mUser,UserManage.User_List+"1",
				nodeId);
		list.setParams(params);
		ActionCallbackBase action = new ActionCallbackBase(UserManage.User_List);
		action.setActionA();
		mdo.putTable(list.get());
		return mdo.get();
	}
}
